package com.kcwl.carrier.infrastructure.enums;

import lombok.Getter;

/**
 * @author: wyl
 * @create: 2021/6/2 16:04
 * @version: 1.0
 * @desc: 挂车审核驳回原因
 */
@Getter
public enum VehicleTrailerRemarkEnum {
    PLATE_NUMBER_NOT_CONFORM (119, "挂车车牌号","不符","您的挂车车牌号与证件不符，请修改后重新提交"),
    PLATE_NUMBER_NOT_TRAILER(121, "挂车车牌号","非挂车","请填写挂车车牌号信息，请修改后重新提交"),
    TRANSPORTATION_NOT_EXIST (123, "挂车行驶证","缺失","请上传挂车行驶证正页+副页"),
    TRANSPORTATION_VAGUE (125, "挂车行驶证","模糊","行驶证模糊"),
    TRANSPORTATION_NOT_CONFORM (127, "挂车行驶证","车牌号不符","请上传与挂车车牌号一致的证件");

    private int code;
    private String group;
    private String option;
    private String value;

    VehicleTrailerRemarkEnum(int code, String group, String option, String value) {
        this.code = code;
        this.value = value;
        this.option = option;
        this.group = group;
    }

    /**
     * 通过code取枚举
     * @param code
     * @return
     */
    public static VehicleTrailerRemarkEnum getTypeByValue(int code){
        for (VehicleTrailerRemarkEnum enums : VehicleTrailerRemarkEnum.values()) {
            if (enums.getCode() == code) {
                return enums;
            }
        }
        return null;
    }

}
